package experimentForth;

public class FileManage {

    public static void main(String[] args) {
        FileSystem fs = new FileSystem();

        // 创建文件
        System.out.println("创建File1");
        fs.create("User1", "File1", "123");
        System.out.println("创建File2");
        fs.create("User1", "File2", "234");

        // 打开文件
        System.out.println("打开File1");
        fs.open("User1", "File1");

        // 写入数据
        System.out.println("往File1中写入Hello world");
        fs.write("User1", "File1", "Hello, world!");

        // 读取数据
        System.out.println("从File1中读取数据：");
        fs.read("User1", "File1");

        // 关闭文件
        System.out.println("关闭文件");
        fs.close("User1", "File1");

        // 删除文件
        System.out.println("删除文件");
        fs.delete("User1", "File1");
    }
}
